/**
 * 
 */
package com.myBase.core.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.myBase.common.persistence.BaseEntity;

/**
 * ebei 系统用户账户信息Entity
 * @author WuJie
 * @version 2017-05-04
 */
public class GoldcoinAccount extends BaseEntity<GoldcoinAccount> {

    private static final long serialVersionUID = 1L;

    private String accountid; // 主键

    private String branchid; // 多系统支持（易贷msyidai）

    private String userid; // 易贷/转赚中用户id

    private Date createdatetime; // 账户产生日期

    private String accountstatus; // 账户状态，00-正常，01-系统冻结，02-用户销户

    private String subchannel; // 渠道来源

    private String userName; //用户名称

    private String mobile; //用户手机号

    public GoldcoinAccount() {
        super();
    }

    @Length(min = 1, max = 8, message = "主键长度必须介于 1 和 8 之间")
    public String getAccountid() {
        return accountid;
    }

    public void setAccountid(String accountid) {
        this.accountid = accountid;
    }

    @Length(min = 1, max = 8, message = "易贷/转赚中用户id长度必须介于 1 和 8 之间")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "账户产生日期不能为空")
    public Date getCreatedatetime() {
        return createdatetime;
    }

    public void setCreatedatetime(Date createdatetime) {
        this.createdatetime = createdatetime;
    }

    @Length(min = 1, max = 2, message = "账户状态，00-正常，01-系统冻结，02-用户销户长度必须介于 1 和 2 之间")
    public String getAccountstatus() {
        return accountstatus;
    }

    public void setAccountstatus(String accountstatus) {
        this.accountstatus = accountstatus;
    }

    @Length(min = 0, max = 50, message = "渠道来源长度必须介于 0 和 50 之间")
    public String getSubchannel() {
        return subchannel;
    }

    public void setSubchannel(String subchannel) {
        this.subchannel = subchannel;
    }

    @Length(min = 0, max = 64, message = "用户名称必须介于 0 和 64 之间")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Length(min = 0, max = 20, message = "用户手机号必须介于 0 和 20 之间")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getBranchid() {
        return branchid;
    }

    public void setBranchid(String branchid) {
        this.branchid = branchid;
    }
}